import React from "react";

export default class RefTest extends React.Component {
    constructor(props) {
        super(props);
        this.textInput=React.createRef();
    }

    componentDidMount() {
        this.textInput.current.focus();
    }

    render() {
        return <input ref={this.textInput}/>
    }

}